/**
 * 
 */
package com.buho29.rcmanager.bd;

import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

/**
 * @author pp
 *
 */
public abstract class BaseActiveRecord implements ActiveRecord{
	public static String SQL_TABLE_NAME = null;
	public static String[] COLUMNS = null;
	
    public static final int CMD_NEW= 1;
    public static final int CMD_EDIT=2;
	
	public static final String COL_ROW_ID = "_id";

	protected SQLiteDatabase mDb;

	protected long mId = 0L;
	public long getId() {return mId;}
	public void setId(long id) {
		mId = id;}
	
	@Override
	public void setSQLiteDatabase(SQLiteDatabase sqliteDatabase) {
		this.mDb = sqliteDatabase;
	}
	
	@Override
	public abstract boolean delete() ;
	
	@Override
	public abstract Cursor retrieveAll() ;

	@Override
	public abstract Boolean load(); 

	@Override
	public abstract long save() ;
}
